package oneD.fem.element.nonlinear;

import oneD.fem.Node;
import inf.jlinalg.IVector;

public class Cable extends PrestressTruss {

	public Cable(double rho, double e, double a, double preS,
			Node n1, Node n2) {
		super(rho, e, a, preS, n1, n2);
	}

	@Override
	protected double computeStress(IVector ue) {
		double stress = this.eModulus_ * this.computeE11(ue) + this.preStress_;
		if (stress < 0)
			stress = 0;
		return stress;
	}
	
}
